# Contributor: Taner Tas <taner76@gmail.com>
# Maintainer: Taner Tas <taner76@gmail.com>
pkgname=libmysofa
pkgver=1.2.1
pkgrel=0
pkgdesc="Set of C functions to read AES SOFA files"
url="https://github.com/hoene/libmysofa"
license="BSD-3-Clause-Clear"
arch="all !riscv64" # blocked by nodejs
arch="$arch !s390x" # tests fail
makedepends="
	cmake
	cunit-dev
	nodejs
	zlib-dev
	"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/hoene/libmysofa/archive/v$pkgver.tar.gz"

build() {
	cmake -B build  \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DCODE_COVERAGE=OFF
	make -C build all
}

check() {
	make -C build test
}

package() {
	make -C build DESTDIR="$pkgdir" install
}

sha512sums="
2058c94cd09aeeabe40975edd320d7447bd9e535108f32b2a5305c023c7bf89f0c2f44df182390b7e4be8f6ffc9b09c2e35817896bb5e63d3ec9f1bd5b7e972c  libmysofa-1.2.1.tar.gz
"
